package com.xiangban.yanglaodajie_platform.service;

import com.xiangban.yanglaodajie_platform.utils.OssUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

@Service
public class UploadService {
    @Autowired
    private HttpServletRequest request;

    public String file(MultipartFile file) {
        if (file.isEmpty()) {
            System.out.println("文件为空");
        }
        return new OssUtil().checkImage(file,request);
    }
}
